package com.ebelter.btcomlib.models.bluetooth.products.bloodoxgen.bean;

import com.ebelter.btcomlib.models.db.AppDatabase;
import com.ebelter.btcomlib.utils.TimeUtils;
import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Table;
import com.raizlabs.android.dbflow.structure.BaseModel;


@Table(database = AppDatabase.class)
public class BOMesureResultBean extends BaseModel{


    public static final String TAG = "BOMesureResultBean";

    @PrimaryKey(autoincrement = true)//ID自增
    public long id;

    /*** 血氧值 **/
    @Column
    public int bloodOxygen;

    @Column
    public String authKey;

    /*** 脉搏 ***/
    @Column
    public int pulse;

    @Column
    public long mesureTimeLong;

    @Column
    public String mesureTimeStr;

    public BOMesureResultBean() {
    }

    public BOMesureResultBean(int bloodOxygen, int pulse, long mesureTimeLong) {

        this.bloodOxygen = bloodOxygen;
        this.pulse = pulse;
        this.mesureTimeLong = mesureTimeLong;
        this.mesureTimeStr = TimeUtils.formatTime1(mesureTimeLong);
    }

    @Override
    public String toString() {
        return "BOMesureResultBean{" +
                "bloodOxygen=" + bloodOxygen +
                ", pulse=" + pulse +
                ", mesureTimeLong=" + mesureTimeLong +
                '}';
    }
}
